﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.ComponentModel;

namespace KinectGestureRecognition.ObjectDetection
{
   #region abstract container implemetation
   public class ChartingCollection<TIndepend, TDepend>
       : ObservableCollection<ChartSet<TIndepend, TDepend>>
   {

       public ChartingCollection<string, int> Data { get; set; }

       public void Add(TIndepend independentValue, TDepend dependentValue)
       {
           Add(new ChartSet<TIndepend, TDepend>(independentValue, dependentValue));
       }


        /**
        #region Property Changed Implementation

        // Declare the PropertyChanged event
        public event PropertyChangedEventHandler PropertyChanged;

        // OnPropertyChanged will raise the PropertyChanged event passing the
        // source property that is being updated.
        private void onPropertyChanged(object sender, string propertyName)
        {
            if (this.PropertyChanged != null)
            {
                PropertyChanged(sender, new PropertyChangedEventArgs(propertyName));
            }
        }
        #endregion **/
    }

    public class ChartSet<TIndepend, TDepend>
    {
       public ChartSet(TIndepend independentValue, TDepend dependentValue)
       {
           DependentValue = dependentValue;
           IndependentValue = independentValue;
       }
 
       public ChartSet()
       {
 
       }
 
       public TDepend DependentValue { get; set; }
 
       public TIndepend IndependentValue { get; set; }
    }

    #endregion

    #region concrete int implemetation
    public class ChartingCollectionInt : ObservableCollection<ChartSetInt>
    {
        //  public ChartingCollection<string, int> Data { get; set; }
        public void Add(int independentValue, int dependentValue)
        {
            Add(new ChartSetInt(independentValue, dependentValue));
        }
    }

    public class ChartSetInt
    {
        public ChartSetInt(int independentValue, int dependentValue)
        {
            DependentValue = dependentValue;
            IndependentValue = independentValue;
        }

        public ChartSetInt()
        {

        }

        public int DependentValue { get; set; }

        public int IndependentValue { get; set; }
    }
    #endregion
}
